<?php
/**
 * Created by PhpStorm.
 * User: WX-C
 * Date: 2018/4/19
 * Time: 11:30
 */

namespace app\common\helper;

class Response
{
    static  public function success($data,$count=0,$msg=''){
        $param=[
            'code'=>0,
            'msg'=>$msg,
            'count'=>$count,
            'data'=>$data
        ];
        return json($param);
    }
    static public function error($msg){
        $param=[
            'code'=>1,
            'msg'=>$msg,
        ];
        return json($param);
    }
}